package online.cmagic.createType.singleton;

/**
 * 静态内部类式单例
 * @author wangsc
 * @date: 2020年04月12日 12:13
 * @since JDK 1.8
 */
public class StaticClassSingleton {

    private StaticClassSingleton(){

    }

    public static StaticClassSingleton newInstance(){
        return StaticInnerClass.SINGLETON;
    }

    private static class StaticInnerClass{
        public static StaticClassSingleton SINGLETON=new StaticClassSingleton();
    }
}
